var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var schema = new mongoose.Schema({
    productname: String,
    productbrief:String,
    retailprice :Number,
    activityprice :Number,
    purchaseprice :Number,
    groupbuyingprice :Number,
    stock :Number,
    channel:String,
    category:String,
    ctime:{ type: Date, default: Date.now() },
});
schema.plugin(mongoosePaginate);

module.exports = mongoose.model('products',  schema);  // Model.paginate()